//
//  ARC_DB.h
//  SQLiteTesting
//
//  Created by kitinat on 1/23/13.
//  Copyright (c) 2013 EGA. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "EGAarcAssignCell.h"
@interface ARC_DB : NSObject

@property (nonatomic,strong) NSString *_dbPath;

- (BOOL)internetConnected;
- (BOOL)isHasUserInfoDB;

-(void) saveUserData:(NSString*)EmpID
              RoleID:(NSString*)RoleID
            RoleName:(NSString*)RoleName
               Title:(NSString*)Title
         FirstNameTH:(NSString*)FirstNameTH
          LastNameTH:(NSString*)LastNameTH
          SectorName:(NSString*)SectorName
           IsHeadEGA:(NSString*)IsHeadEGA;
-(NSDictionary*) getUserData;




-(BOOL)isHasBookInDB;
-(void) saveAllBook;
-(void) deleteAllBook;
//-(EGAarcAssignCell*) saveBook;
-(NSMutableArray*) getBook;
-(NSMutableArray*) getBooktest;
-(NSDictionary*) getOneBookDetail:(NSString*)BookID;
-(void) updateOneBookDetail:(NSString*)BookID;
-(void) uddateBookList:(NSString*)documentListID
               empMail:(NSString*)empMail
           description:(NSString*)description
             StartDate:(NSString*)StartDate
               EndDate:(NSString*)EndDate
         DocPriorityID:(NSString*)DocPriorityID
             IsDueDate:(NSString*)IsDueDate;



-(BOOL)isHasAllTaskInDB;
-(void) saveAllTask;
-(NSMutableArray*) getAllTaskType0;
-(NSMutableArray*) getAllTaskType1;
-(NSMutableArray*) getAllTaskType2;
-(NSMutableArray*) getAllTaskType3;
-(NSDictionary*) countAllTask;



-(BOOL)isHasMyTaskInDB;
-(void) saveMyTask:(NSString*)EmpID;
-(NSMutableArray*) getMyTaskType0;
-(NSMutableArray*) getMyTaskType1;
-(NSMutableArray*) getMyTaskType2;
-(NSMutableArray*) getMyTaskType3;
-(NSDictionary*) countMyTask;






-(BOOL)isHasTaskDetailInDB:(NSString*)DocID;
-(void)saveTaskDetail:(NSString*)DocID taskUserOrAdmin:(NSString*)taskUserOrAdmin empID:(NSString*)empID;
-(NSMutableArray*)getTaskDetail:(NSString*)DocID;










-(NSMutableArray*)whoYouWillBeAbleToCommand:(NSString*)EmpID
                                      DocID:(NSString*)DocID;










#pragma talkfirststep
-(BOOL)isHasTalkLV1InDB:(NSString*)DocID;
-(void)saveTalkLV1:(NSString*)DocID;
-(NSMutableArray*)getTalkLV1:(NSString*)DocID;





#pragma talkSecondstep
-(BOOL)isHasTalkLV2InDB:(NSString*)DocID;
-(void)saveTalkLV2:(NSString*)DocID EmpID:(NSString*)EmpID;
-(NSMutableArray*)getTalkLV2:(NSString*)DocID;




#pragma ListEmpData
-(NSMutableArray*)getEmpdata;
-(void)saveEmpData;
-(BOOL)isHasEmpdataDB;







#pragma ListNewBook
-(BOOL)isHasNewBookDB;
-(void) saveNewBook:(NSString*)Type;
-(NSMutableArray*) getNewBook;
-(void)saveBookStatus:(NSString*)DocID;
-(void)deleteNewBookAssign:(NSString*)DocID;
-(void) saveAllBookNew:(NSString*)Type;
-(void) saveAllBookListNew:(NSString*)Type;






@end
